#ifndef __LED_H
#define __LED_H

#include "stm32f4xx.h"

typedef enum State_LED_Enum{
    LED_OFF =   0x00,
    LED_ON =    0x01
}State_LED;

typedef struct Device_LED_Struct{
    GPIO_TypeDef    *GPIO_Port;
    uint16_t        GPIO_Pin;
    BitAction       bitValWhenStateIsOn;
    State_LED       state;
}Device_LED;

void        BSP_LED_SetState(volatile Device_LED *dv, State_LED state);
void        BSP_LED_ToggleState(volatile Device_LED *dv);
void        BSP_LED_Flash(volatile Device_LED *dv, uint32_t periodDurUs, uint32_t nPeriods, uint8_t isInIrq);
State_LED   BSP_LED_SyncState(volatile Device_LED *dv);

#endif
